﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using AudioBookWS.ServiceEntity;

namespace AudioBookWS.ServiceUtil
{
    public class WSUtils
    {
        /// <summary>
        /// Create a notify item
        /// </summary>
        /// <param name="message">Notify message</param>
        /// <returns></returns>
        public static I GetNotifyItem(string message)
        {
            I en = new I();
            en.d = message;
            en.y = ((int)WSConstants.ContentType.Notify).ToString();
            return en;
        }

        /// <summary>
        /// Create a counter item
        /// </summary>
        /// <param name="number">Counter number</param>
        /// <returns></returns>
        public static I GetCounterItem(int number)
        {
            I en = new I();
            en.c = number.ToString();
            en.y = ((int)WSConstants.ContentType.Counter).ToString();
            return en;
        }

        /// <summary>
        /// Create a blocked item
        /// </summary>
        /// <param name="message">Blocked message</param>
        /// <returns></returns>
        public static I GetBlockedItem(string message)
        {
            I en = new I();
            en.d = message;
            en.y = ((int)WSConstants.ContentType.BlockedRequest).ToString();
            return en;
        }
    }
}
